# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=maui
pkgname=buho
pkgver=4.0.0
pkgrel=0
pkgdesc="Note taking app based on MauiKit"
# armhf blocked by qt5-qtdeclarative
# s390x, ppc64le, riscv64 and loongarch64 blocked by qt5-qtwebview
arch="all !armhf !s390x !ppc64le !riscv64 !loongarch64"
url="https://invent.kde.org/maui/buho"
license="GPL-2.0-or-later"
depends="
	kde-icons
	mauikit-texteditor
	"
makedepends="
	attica-dev
	extra-cmake-modules
	kconfig-dev
	ki18n-dev
	kio-dev
	knotifications-dev
	mauikit-dev
	mauikit-accounts-dev
	mauikit-filebrowsing-dev
	mauikit-texteditor-dev
	qt6-qtbase-dev
	qt6-qtbase-sqlite
	qt6-qtdeclarative-dev
	qt6-qtsvg-dev
	qt6-qtwebview-dev
	samurai
	syntax-highlighting-dev
	"
subpackages="$pkgname-lang"
_repo_url="https://invent.kde.org/maui/buho.git"
source="https://download.kde.org/stable/maui/buho/$pkgver/buho-$pkgver.tar.xz
	0001-$pkgname-Fix-build.patch::https://invent.kde.org/maui/buho/-/merge_requests/7.patch
	"
options="!check" # No tests available

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}
sha512sums="
003b7d52573d7d5b1512507415d99356b9f80bb362f19bfd1a12ff8e1a96ec653cafed05900c5aa6563ddeda7d9ee5d93080ec9c5c17e52c61b9d8df662f0796  buho-4.0.0.tar.xz
0b1c6fd0658bd2986a1c8193b2d921e578521ecc5e74436cf7806d40366784462fb67d94429ca416f33c69a26fb54a832fe422a2d32365f51bcd82e3a3512425  0001-buho-Fix-build.patch
"
